#include<iostream>
using namespace std;
int main(){
    int n,num=0;
    while (cin>>n){
    while (n!=1){
        if(n&1){
            n=(3*n+1)/2;
            num++;
        }else{
            n=n>>1;
            num++;
        }
    }
    cout<<num<<endl;
    }
}
